<include file="public@header"/>
</head>
<body>
<div class="wrap">
  <ul class="nav nav-tabs">
    <li class="active"><a>{:lang('USER_INDEXADMIN_INDEX')}</a></li>
  </ul>
  <form class="well form-inline margin-top-20" method="post" action="{:url('user/adminIndex/index')}">
    用户ID：
    <input class="form-control" type="text" name="uid" style="width: 200px;" value="{:input('request.uid')}"
           placeholder="请输入用户ID">

    分类:
    <select class="form-control" name="level" style="width: 140px;">
      <option value='0'>全部</option>
      <option value='1' <if $level eq 1 >selected</if>  >管理</option>
    </select> &nbsp;&nbsp;
    团队:
    <select class="form-control" name="hz" style="width: 140px;">
      <option value=''>全部</option>

      <volist name="hezuo" id="hzs">
        <option value='{$hzs.id}' <if $hz eq $hzs.id >selected</if>  >{$hzs.title} </option>
      </volist>

    </select> &nbsp;&nbsp;

    关键字：
    <input class="form-control" type="text" name="keyword" style="width: 200px;" value="{:input('request.keyword')}"
           placeholder="用户名/昵称/姓名/手机">
    <input type="submit" class="btn btn-primary" value="搜索"/>
    <a class="btn btn-danger" href="{:url('user/adminIndex/index')}">清空</a>
  </form>
  <form method="post" class="js-ajax-form">
    <table class="table table-hover table-bordered">
      <thead>
      <tr>
        <th>ID</th>
        <th>{:lang('NICENAME')}</th>
        <th>姓名</th>
        <th>手机</th>
        <th>团队</th>

        <th>推荐人</th>
        <th>类型</th>
        <th>入库</th>
        <th>{:lang('ACTIONS')}</th>
      </tr>
      </thead>
      <tbody>
      <php>
        $user_statuses=array("0"=>lang('USER_STATUS_BLOCKED'),"1"=>lang('USER_STATUS_ACTIVATED'),"2"=>lang('USER_STATUS_UNVERIFIED'));
      </php>
      <foreach name="list" item="vo">
        <tr>
          <td>{$vo.id}</td>
          <td><img width="25" height="25" src="{:url('user/public/avatar',array('id'=>$vo['id']))}"/>{$vo['user_nickname']}</td>

          <td>{$vo.name}</td>
          <td>{$vo.mobile}</td>
          <td>{$vo.team_title}</td>



          <td>{:getpname($vo.agentid)}</td>
          <td>
            <eq name="vo.level" value="2">
              负责人
            </eq>
            <eq name="vo.level" value="1">
              加盟商
            </eq>
            <eq name="vo.level" value="0">
              普通
            </eq>
          </td>

          <td>
            <eq name="vo.kf" value="1">
              入库管理
            </eq>
            <eq name="vo.level" value="0">
              无权限
            </eq>
          </td>

          <td>


            <a class="btn btn-xs btn-success seelogs" data-id="{$vo.id}">查看推广</a>

            <neq name="vo.id" value="1">
              <a class="btn btn-xs btn-success bianji" data-id="{$vo.id}">编辑信息</a>
              <else/>
              <a class="btn btn-xs btn-warning disabled">{:lang('BLOCK_USER')}</a>
            </neq>
          </td>
        </tr>
      </foreach>
      </tbody>
    </table>
    <div class="pagination">{$page}</div>
  </form>
</div>
<script src="__STATIC__/js/admin.js"></script>

<script>

  $(".seelogs").click(function (){

    var id=$(this).data('id');
    var curl="{:url('user/adminIndex/seelogs')}?id="+id;
    layer.open({
      type: 2,
      area: ['1000px', '600px'],
      content: curl,
      success:function (){
        var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
        parent.layer.close(index); //再执行关闭
      }
    });

  })



  $(".bianji").click(function (){

    var id=$(this).data('id');

    var curl="{:url('user/adminIndex/seting')}?id="+id;

    layer.open({
      type: 2,
      area: ['700px', '500px'],
      content: curl,
      success:function (){
        var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
        parent.layer.close(index); //再执行关闭
      }
    });

  })



</script>
</body>
</html>